package com.cn.springcloudwechat.mapper.mapper.attachment;

import com.cn.springcloudwechat.model.attachment.YmAttachmentRelevance;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

@Repository
public interface YmAttachmentRelevanceMapper {
    int insert(YmAttachmentRelevance record);
	@Transactional(rollbackFor = Exception.class)
    int insertSelective(YmAttachmentRelevance record);
    
    int updateSelective(YmAttachmentRelevance record);

	/**
	 * 将附件置为无效
	 * @param relevanceId
	 * @param relevanceTpyeId
	 */
	void updateAttachmentRelevanceState(@Param("relevanceId") Long relevanceId, @Param("relevanceTpyeId") String relevanceTpyeId);

	/**
	 * 将附件置为无效
	 * @param relevanceId
	 * @param relevanceTpyeId
	 * @param relevanceTpyeDetail
	 */
	void updateAttachmentRelevanceByRelevanceState(@Param("relevanceId") Long relevanceId, @Param("relevanceTpyeId") String relevanceTpyeId,
												   @Param("relevanceTpyeDetail")Integer  relevanceTpyeDetail);
}